package com.naiterui.ehp.bs.patient.bo.notice.subscribe;

import com.naiterui.ehp.bs.patient.config.SubscribeProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 用药提醒-订阅通知
 *
 * @author yangfuya
 * @version 1.0
 * @date 2021/4/8 16:20
 **/
@Data
@Builder
@AllArgsConstructor
public class MedicationRemindSubscribe extends BaseSubscribe {

    private static final long serialVersionUID = 1470073506500866865L;
    /**
     * 药品名
     */
    private String drug;

    @Override
    public String getTemplateLabel() {
        return "MEDICATION_REMIND";
    }

    @Override
    public void handleContent(List<SubscribeProperties.Content> contentList) {
        Map<String, String> formatMap = new HashMap<>();
        formatMap.put("DRUG", getDrug());
        super.formatData(contentList, formatMap);
    }
}
